package com.chixing.service;

import com.chixing.entity.Car;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chixing.entity.vo.CarAddress;
import com.chixing.util.Result;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shy
 * @since 2022-10-20
 */
public interface ICarService extends IService<Car> {
    // 加载热门商品： 根据折扣降序排序，前3个
    public List<Car> getHotDiscountProduct();

    //根据车辆id查询车辆
    Car getByCarId(Integer carId);

    //点击抢购时，商品减库存: Redis 分布式锁
    Car decreaseProductNumFromRedis(Integer carId);

    List<Car> getCarByCustId(Integer custId);

    List<Car> getCarByOutletsName(String outletsName);

    Result getAllCar();

     Result getCarView();

    //封装business_outlets AND car表
    CarAddress getCarAddress(String name);

}
